package cn.edu.jxau.admin.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.jxau.service.deleteUser;

public class deleteUserServlet extends HttpServlet {


	/**
	 * 删除用户
	 */
	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html；charset=utf-8");
	   
		String username=new String(request.getParameter("name").getBytes("iso-8859-1"),"utf-8");
		
		deleteUser.deleteUserByUsername(username);
		
		response.sendRedirect("readUserInfoServlet");
      
	}

}
